<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Menu" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView();?>
</head>
<body class="view_form" id="view_form_Menu">
                    

        <form class="view-form-form" method="post" action="<?php echo \Yii::$app->urlManager->createUrl([$model->menuid ? '/mobo/menu/update' : '/mobo/menu/create', 'menuid'=>$model->menuid]);?>" enctype="multipart/form-data">

		<input type="hidden" name="_csrf" value="<?php echo Yii::$app->request->csrfToken;?>"/>
            <table class="view-form-input" border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>

                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">上级分类：</label></th>
                        <td class="td-input">
						<select name="BackendMenu[parentid]">
                        <option value="0"<?php echo $model->parentid == 0 ? ' selected' : ''?>>一级分类</option>
						<?php echo $select;?>
                        </select>
                        </td>
                    </tr>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">名称：</label></th>
                        <td class="td-input">
                        <?php if(Yii::$app->requestedAction->id == 'create'){?>
                        <textarea class="textarea-text" style="width:200px" id="name" name="BackendMenu[name]"><?php echo $model->name;?></textarea>一行一个
                        <?php
						}else{
						?>
                        <input type="text" class="input-text" id="name" name="BackendMenu[name]" value="<?php echo $model->name;?>">
                        <?php
						}
						?>
                        </td>
                    </tr>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">排序：</label></th>
                        <td class="td-input"><input type="text" class="input-text" id="listorder" name="BackendMenu[listorder]" value="<?php echo $model->listorder;?>"></td>
                    </tr>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">控制器方法：</label></th>
                        <td class="td-input"><input type="text" class="input-text" id="controllers" name="BackendMenu[controllers]" value="<?php echo $model->controllers;?>"> 如：Post/Index</td>
                    </tr>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">附加参数：</label></th>
                        <td class="td-input"><input type="text" class="input-text" id="params" name="BackendMenu[params]" value="<?php echo $model->params;?>"> 如：type/123</td>
                    </tr>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid">快捷菜单：</label></th>
                        <td class="td-input"><?php
						

echo common\widgets\CommonWidget::widget(['viewPath'=>'switchbutton', 'options' => [
'id'=> 'shortcut',
'name'=> 'BackendMenu[shortcut]',
								'attributes'=> array_merge($model->attributes, array('id'=>$model->menuid)),
								'model'=> $model

]]);

						/* $this->widget(
							'mobo.widgets.switch.SwitchWidget',
							array(
								'field'=> array('field'=>'shortcut', '_name'=>'BackendMenu[shortcut]'),
								'data'=> array_merge($model->attributes, array('id'=>$model->menuid)),
								'model'=> $model
							)
						);*/
						?></td>
                    </tr>
                    
                                        <tr>
                        <th></th>
                        <td><input type="submit" value="提交" name="sbmt" class="btn-submit">
                            </td>
                    </tr>
                        </tbody>
                    
            </table>

    </form>
<script type="text/javascript">
$(function(){
    

});
</script>
<?php $this->FooterView();?>
</body>
</html>
